<template>
  <el-dialog
    title="指定委托人"
    :visible.sync="appointVisile"
    :show-close="false"
    width="30%"
    center>
    <div>
      <el-select v-model="appointer" placeholder="请选择" @change="appointChange">
        <el-option
          v-for="item in appointerList"
          :key="item.id"
          :label="item.truename"
          :value="item.id">
        </el-option>
      </el-select>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="cancle">取 消</el-button>
      <el-button type="primary" @click="setAppinterFunc">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  data () {
    return {
      // appointerList: [],
      appointer: ''
    }
  },
  props: ['appointVisile', 'appointerList'],
  methods: {
    cancle () {
      this.$emit('appointerChild')
    },
    appointChange (e) {
      console.log(e)
      this.appointer = e
    },
    setAppinterFunc () {
      this.$emit('childFlag', this.appointer)
    }
  }
}
</script>
